package com.example.project.business.circleRef;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;

@Lazy
@Component
// a没有aop的时候，三级缓存用的同一个对象
// a有aop的时候，二，三级缓存是原始对象，一级缓存是代理对象， 报错 CurrentInCreateEX
//@Async 
public class RefA implements Ordered
{
    @Autowired
    private RefB b;

    @Override
    public int getOrder()
    {
        return Ordered.HIGHEST_PRECEDENCE;
    }
}
